/* Hello World Example

   This example code is in the Public Domain (or CC0 licensed, at your option.)

   Unless required by applicable law or agreed to in writing, this
   software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
   CONDITIONS OF ANY KIND, either express or implied.
*/

#ifndef __TASK__I2C_H__
#define __TASK__I2C_H__

#include "task_public.h"

extern SemaphoreHandle_t mutex_i2c;


void I2C_Master_Init(void);
void I2C_Master_Start(void);
void I2C_Master_Stop(void);
void I2C_Master_Ack(void);
void I2C_Master_NAck(void);
uint8_t I2C_Master_WaitAck(void);
void I2C_Master_delay(void);
void I2C_Master_Send_Byte(uint8_t dat);
void I2C_Master_Send_1Byte(uint8_t slave_addr, uint8_t reg_address, uint8_t dat);
void I2C_Master_Send_Bytes(uint8_t slave_addr, uint8_t reg_address, uint8_t *dat, uint16_t len);
void I2C_Master_Read_Byte(uint8_t *dat);

#endif
